package cn.ycl.constans;

/**
 * 通用常量信息
 *
 * @author weilai
 */
public class Constants {

    /**
     * redis中预热的产品库存前缀
     */
    public static final String REDIS_PRODUCT_STOCK_PREFIX="product_stock_";
    /**
     * 请求成功
     */
    public static final String SUCCESS="success";
    /**
     * 请求成功Code
     */
    public static final int SUCCESS_CODE=200;
    /**
     * 请求失败
     */
    public static final String FAIL="fail";
    /**
     * 请求失败Code
     */
    public static final int FAIL_CODE=500;

    /**
     * 用户状态（0：禁用 1：正常）
     */
    public static final String STATUS_ENABLE = "1";

    /**
     * 用户状态（0：禁用 1：正常）
     */
    public static final String STATUS_DISABLE = "0";

    /**
     * 操作数据库时失败
     */
    public static final String DATA_FAIL="在调用数据库增删改查的方法时失败，请检查";

    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 2;



    /**
     * 获取返回数据code
     */
    public static final String CODE = "code";
    /**
     * 获取返回数据data
     */
    public static final String DATA = "data";
    /**
     * 获取返回数据msg
     */
    public static final String MSG = "msg";
}
